package edu.gatech.oad.mule;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;
import edu.gatech.oad.mule.model.GameStateMachine.GameState;
/**
 * Tests the interact method in the Bar class. The 
 * test case checks to make sure that the player is 
 * given a random reward amount each time they visit
 * the bar. The assertNotSame checks to make sure the 
 * player's score has changed.
 * 
 * @author D'Miria Collins
 * @version %I%, %G%\
 *
 */
public class BarTest {

	@Before
	public void setUp(){
	}

	/**
	 * Tests the interact method in the Bar class. 
	 * The test case checks to make sure that the player
	 * is given a random reward each time. The assertNotSame
	 * checks to make sure the player's score has changed.
	 */
	@Test
	public void testInteract() {
		Player player = new Player();
		//saves the players current score
		int p = player.getMoney();		
		GameState state = GameState.DEVELOPMENT;
		//(x location,y location,width, height)
		Bar b = new Bar(0,0,10,10);	
		//(Player, GameState, round, time)
		b.interact(player, state, 3, 15);
		//player's old score != player's new score 
		assertNotSame(p,player.getMoney());
	}

}
